<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>
    <h1>{{info}}</h1>
    <input type="button" value="get请求" @click="f1()">
    <input type="button" value="post请求" @click="f2()">
</div>

<script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.min.js"></script>

<script>
    let v=new Vue({
        el:"body>div",
        data:{
            info:"Hello Axios"
        },
        methods: {
            f1() {
                axios.get("/helloAxios?info=abc").then(function (response) {
                    alert(response.data);
                });
            }
        }
    })
</script>
</body>
</html>